home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 2: CDPD 1
/
Almathera Ten on Ten - Disc 2: CDPD 1.iso
/
pd
/
076-100
/
077
/
samples
/
qfunc.d
< prev
next >
Wrap
Text File
|
1995-03-13
|
366b
|
24 lines
bool PRINT = false;
int SIZE = 1000,
TIMES = 100;
[SIZE + 1] int A;
proc main()void:
int i, count;
writeln("Starting..");
for count from 1 upto TIMES do
A[1] := 1;
A[2] := 2;
for i from 3 upto 1000 do
A[i] := A[i - A[i - 1]] + A[i - A[i - 2]];
if PRINT then
writeln(i, ' ', A[i]);
fi;
od;
od;
writeln("Done.");
corp;